package com.yunhai.model.entity.dms;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

@Data
@ApiModel("设备上传警告")
public class DmsDeviceUploadAlarmEntity {

    @ApiModelProperty( value = "记录id")
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    @ApiModelProperty( value = "告警名称")
    private String name;

    @ApiModelProperty( value = "设备唯一id")
    private String sn;

    @ApiModelProperty( value = "创建时间")
    @JsonFormat( pattern = "YYYY-MM-dd HH:mm:ss")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @TableField( value="create_time", fill= FieldFill.INSERT_UPDATE )
    private Date createTime;

    @JsonIgnore
    @TableLogic
    private Integer isDeleted;

}
